package com.moguhoutai.biz;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.moguhoutai.dao.PayMapper;
import com.moguhoutai.model.Pay;
import com.moguhoutai.util.BusinessException;

@Service
public class payBiz {
    @Resource
	private PayMapper paMapperdao;
	
    public Pay findById(int payId)throws BusinessException{
    	try {
			return paMapperdao.selectByPrimaryKey(payId);
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E09B04");
		}
    }
    
    public void save(Pay pay)throws BusinessException{
    	try {
			 paMapperdao.insert(pay);
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E09B01");
		}
    }
    
}
